package com.ttdevs.ttrss.net;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.List;

import org.mcsoxford.rss.RSSItem;

import com.ttdevs.ttrss.bean.Article;

public interface IConnection {

	public InputStream getResult(String urlStr) throws MalformedURLException,
			IOException;

	public interface OnNetworkRespListener {
		public void onNetworkResp(boolean isSuccess, InputStream is);
	}

	public void startRequest(String link, OnNetworkRespListener listener);

	public interface OnResponseListener {
		public void oResponse(boolean isSuccess, List<RSSItem> lists);
	}

	public void sendRequest(String link, OnResponseListener listener);
}
